﻿using System.IO;
using System.Collections.Generic;
using UnityEngine;

namespace FrameworkEditor.UITools.UIGenerate
{
    public class UIGenerateBase
    {
        protected bool CheckExistFile(string pFilePath, string pFileName)
        {
            if (File.Exists(pFilePath))
            {
                Debug.LogWarning(string.Format("{0}文件已存在，路径为:{1}", pFileName, pFilePath));
                return false;
            }

            return true;
        }

        protected void CreateDirectory(string pDirectoryPath)
        {
            if (!Directory.Exists(pDirectoryPath))
            {
                Directory.CreateDirectory(pDirectoryPath);
            }
        }
    }
}